#pragma once

#include <QObject>

class Response : public QObject
{
	Q_OBJECT

public:

	typedef struct  _resultStruct {
		QString resultType;
		QString content;
	}resultStruct;

public:
	Response(QObject *parent);
	Response::Response(QString code, QList<resultStruct> list);
	Response();

	~Response();

	QString toJson() const;
	static Response& fromJson(const QString& json);

	void setCode(QString code);
	void setResultList(QList<resultStruct> &list);

private:

	QString _code;
	QList<resultStruct> _list;
	

};
